<!DOCTYPE html>
<html>
  <head>
    <title>图书管理系统</title>
    <link rel="stylesheet" href="/bootstrap/dist/css/bootstrap.min.css">
    <link rel='stylesheet' href='/stylesheets/style.css' />
  </head>
  <body>
    <h1 class="login">图书管理系统</h1>
    <a class="btn btn-success" href="/add/student">添加学生</a>
    <table class="table table-striped">
      <thead>
        <tr>
          <th>序号</th>
          <th>名称</th>
          <th>作者</th>
          <th>分类</th>
          <th>描述</th>
          <th>操作</th>
        </tr>
      </thead>
      
      <tbody>
        
        <% books.forEach((item,index)=>{ %> 
          <tr>
            <td> <%= index %> </td>
            <td>  <%= item.bookname %> </td>
            <td> <%= item.author %> </td>
            <td> <%= item.cat %> </td>
            <td> <%= item.des %> </td>
            <td>
              <a href="/update/book?id=<%= item.id %>">修改</a>
              <a href="/delete/book?id=<%= item.id %>">删除</a>
            </td>
          </tr>
         <% }) %> 

      </tbody>
    </table>
  </body>
</html>
